import type { TreeProps as AntdTreeProps } from 'antd';
import { Tree as AntdTree } from 'antd';
import React from 'react';
import DirectoryTree from './DirectoryTree';
import TreeNode from './TreeNode';

export type { TreeDataNode } from 'antd';
export type { Props as DirectoryTreeProps } from './DirectoryTree';
export type { Props as TreeNodeProps } from './TreeNode';
export { DirectoryTree, TreeNode };

export type TreeProps = AntdTreeProps;

function Tree(props: TreeProps) {
  return <AntdTree {...props} />;
}

Tree.TreeNode = TreeNode;
Tree.Button = DirectoryTree;
export default Tree;
